﻿using UnityEngine;
using System.Collections;

public class spikeScript : MonoBehaviour {
	
	playerScript player;
	//bool playerFlag;
	
	// Use this for initialization
	void Start () {
		//playerFlag = false;
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnTriggerEnter(Collider myCol)
	{
		if(myCol.tag == "Player" && myCol.networkView.isMine)	
		{
			player = myCol.GetComponent<playerScript>();
			player.playerDie();
		}
	}
}
